package com.technician.controller;

import com.technician.common.PageRequest;
import com.technician.common.ResponseResult;
import com.technician.model.dto.comment.CommentInsertRequest;
import com.technician.model.dto.comment.CommentQueryRequest;
import com.technician.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/comment")
public class CommentController {

    @Autowired
    private CommentService commentService;

    @PostMapping("/commentList")
    public ResponseResult commentList(@RequestBody CommentQueryRequest commentQueryRequest) {
        return commentService.commentList(commentQueryRequest);
    }

    @PostMapping("/addComment")
    public ResponseResult addComment(@RequestBody CommentInsertRequest commentInsertRequest) {
        return commentService.addComment(commentInsertRequest);
    }
}
